#include "DeaconsWidget.h"

void DeaconsWidget::loadPhysical()
{
	physical1->setText(QString("%1").arg(m_youth->deacons().physical().req1()));
	physical2->setText(QString("%1").arg(m_youth->deacons().physical().req2()));
	physical3->setText(QString("%1").arg(m_youth->deacons().physical().req3()));
	physical4->setText(QString("%1").arg(m_youth->deacons().physical().req4()));
	physical5->setText(QString("%1").arg(m_youth->deacons().physical().req5()));
	physical6->setText(QString("%1").arg(m_youth->deacons().physical().req6()));
	physical7->setText(QString("%1").arg(m_youth->deacons().physical().req7()));
	physical8->setText(QString("%1").arg(m_youth->deacons().physical().req8()));
	physical9->setText(QString("%1").arg(m_youth->deacons().physical().req9()));
	physical10->setText(QString("%1").arg(m_youth->deacons().physical().req10()));
	physical11->setText(QString("%1").arg(m_youth->deacons().physical().req11()));
	physical12->setText(QString("%1").arg(m_youth->deacons().physical().req12()));
	physical13->setText(QString("%1").arg(m_youth->deacons().physical().req13()));
}

void DeaconsWidget::on_physical1_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq1(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical2_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq2(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical3_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq3(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical4_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq4(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical5_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq5(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical6_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq6(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical7_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq7(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical8_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq8(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical9_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq9(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical10_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq10(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical11_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq11(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical12_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq12(percent);
	updateCompletions();
}

void DeaconsWidget::on_physical13_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().physical().setReq13(percent);
	updateCompletions();
}

